Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine desktop location fetch #989

Merged
merged 5 commits into from
Aug 30, 2023
Merged

Conversation

binh-dam-ibigroup
Copy link
Collaborator

Description

Undoes #984 and instead, displays an alert on desktop when attempting to use the current location for the first time after loading the page, and location access is blocked.

i18n messages are provided when the user denied location access.

PR Checklist

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better thank you!

// On desktop, after user clicks "Use location" from the location fields,
// show an alert and explain if location is blocked.
if (!isMobile() && error.code === 1) {
window.alert(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit clunky, but I think good enough for now! Could we possibly add a TODO here to move this code into location-field and handle this more elgantly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the TODO in 933d34a.

Copy link
Contributor

@philip-cline philip-cline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@binh-dam-ibigroup binh-dam-ibigroup merged commit f40cc15 into dev Aug 30, 2023
5 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the refine-desktop-location-fetch branch August 30, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants